﻿using System;
using System.Collections.Generic;
using System.Text;

namespace PersistenceObject.Framework.Interface
{
    public interface IPager
    {
        /// <summary>
        /// Query对象
        /// </summary>
        IQuery Query { get; set; }

        /// <summary>
        /// 每次Count计算
        /// </summary>
        Int32 GetCount();

        /// <summary>
        /// 每页次数
        /// </summary>
        Int32 Size { get; set; }

        /// <summary>
        /// 第几页
        /// </summary>
        Int32 PageIndex { get; set; }

        /// <summary>
        /// 获取分页列表内容
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <returns></returns>
        IList<T> List<T>() where T : class;

        /// <summary>
        /// 获取分页列表内容
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="pageIndex"></param>
        /// <returns></returns>
        IList<T> List<T>(Int32 pageIndex) where T : class;

        IList<Combined<T1, T2>> List<T1, T2>()
            where T1 : class
            where T2 : class;

        IList<Combined<T1, T2>> List<T1, T2>(Int32 pageIndex)
            where T1 : class
            where T2 : class;

        IList<Combined<T1, T2, T3>> List<T1, T2, T3>()
            where T1 : class
            where T2 : class
            where T3 : class;

        IList<Combined<T1, T2, T3>> List<T1, T2, T3>(Int32 pageIndex)
            where T1 : class
            where T2 : class
            where T3 : class;


    }
}
